package a_aa_amainpackage.a_o2odata_deal.config
import java.text.SimpleDateFormat
import java.util.{Calendar, Date}

import a_aa_amainpackage.a_o2odata_deal.utils.cateaddressjoin._
import a_aa_amainpackage.a_o2odata_deal.utils.conandvar_deal
import a_aa_amainpackage.a_o2odata_deal.utils.price_deal._
import org.apache.spark.sql.{DataFrame, SQLContext}
import a_aa_amainpackage.a_o2odata_deal.utils.sell_deal._
/*
*项目名: o2odata_commend
*文件名: FieldsConfig
*创建者: hancongcong
*创建时间:2019/8/27 16:07
*描述: TODO
*/ object FieldsConfig {

  //需要的字段
  val fields  =
    """
      |is_flagship,
      |is_market,
      |preSaleCount,
      |earnest,
      |is_o2o,
      |BC_type,
      |Base_Info,
      |allItemCount,
      |brandName,
      |brandValueId,
      |categoryId,
      |commentCount,
      |creditLevel,
      |delivery_from,
      |evaluates,
      |fans,
      |favcount,
      |goodRatePercentage,
      |goodUrl,
      |good_id,
      |images,
      |is_oversea,
      |originCountryName,
      |originItem,
      |originProduction,
      |original_cost,
      |platformId,
      |platformName,
      |quantity,
      |rootCategoryId,
      |sellerNick,
      |sellerType,
      |shopId,
      |shopName,
      |shopType,
      |shopUrl,
      |starts,
      |taxFreeZone,
      |timeStamp,
      |title,
      |userId,
      |detailCategoryName,
      |--is_showLive,
      |is_newProduct,
      |extendedData,
      |sellCount,
      |priceText,
      |salesAmount,
      |last_categoryId
    """.stripMargin
  val varfields =
    """
      |t1.is_flagship,
      |t1.is_market,
      |t1.preSaleCount,
      |t1.earnest,
      |t1.is_o2o,
      |t1.BC_type,
      |t1.Base_Info,
      |t1.allItemCount,
      |t1.brandName,
      |t1.brandValueId,
      |t1.categoryId,
      |t1.commentCount,
      |t1.creditLevel,
      |t1.delivery_from,
      |t1.evaluates,
      |t1.fans,
      |t1.favcount,
      |t1.goodRatePercentage,
      |t1.goodUrl,
      |t1.good_id,
      |t1.images,
      |t1.is_oversea,
      |t1.originCountryName,
      |t1.originItem,
      |t1.originProduction,
      |t1.original_cost,
      |t1.platformId,
      |t1.platformName,
      |t1.quantity,
      |t1.rootCategoryId,
      |t1.sellerNick,
      |t1.sellerType,
      |t1.shopId,
      |t1.shopName,
      |t1.shopType,
      |t1.shopUrl,
      |t1.starts,
      |t1.taxFreeZone,
      |t1.timeStamp,
      |t1.title,
      |t1.userId,
      |--t1.is_showLive,
      |t1.is_newProduct,
      |t1.extendedData,
      |t1.detailCategoryName,
    """.stripMargin

  //异常价格筛选
  val exec_prices =
    """
      |case
      |when good_id = '565881642274' then '10.00'
      |when good_id = '570516568015' then '290.00'
      |when good_id = '550012221060' then '128.00'
      |when good_id = '570108409894' then '420.00'
      |when good_id = '570107133291' then '450.00'
      |when good_id = '579201194333' then '3860.00'
      |--when good_id = '579013737879' then '1999800.00'
      |when priceText = '999999.99'  then '256.00'
      |when good_id = '547834144756' then '24.7'
      |when good_id = '39791234490' then '313'
      |when good_id = '533915691803' then '112'
      |when good_id = '579013737879' then '873950'
      |when good_id = '554682971099' then '300.00'
      |when good_id = '554688651925' then '300.00'
      |when good_id = '565009521252' then '200.00'
      |--554603105829 554638010119 300.00 200.00
      |when good_id = '554603105829' then '300.00'
      |when good_id = '554638010119' then '300.00'
      |when good_id = '565008525618' then '200.00'
      |when good_id = '554606041024' then '300.00'
      |when good_id = '554524868054' then '300.00'
      |when good_id = '556187785520' then '300.00'
      |when good_id = '554977786670' then '300.00'
      |when good_id = '554864100749' then '300.00'
      |when good_id = '544827529239' then '621.00'
      |when good_id = '564925208813' then '200.00'
      |when good_id = '554126589700' then '300.00'
      |when good_id = '554604813853' then '300.00'
      |when good_id = '554056360222' then '300.00'
      |when good_id = '578455397650' then '19.90'
      |when good_id = '533917139894' then '705'
      |when good_id = '533980854871' then '369'
      |when good_id = '534043860302' then '144'
      |when good_id = '526120710599' then '29'
      |when good_id = '525995896472' then '69'
      |when good_id = '39317070735' then '69'
      |when good_id = '40519829319' then '380.00'
      |when good_id = '558134194211' then '89.00'
      |when good_id = '534923254207' then '49.00'
      |when good_id = '45253030426' then '138.00'
      |when good_id = '532642731837' then '65.00'
      |when good_id = '39422118972' then '68.00'
      |when good_id = '567219100788' then '1000.00'
      |when good_id = '562187842105' then '474.79'
      |when good_id = '562118009941' then '256'
      |when good_id = '570351430665' then '1650.00'
      |when good_id = '552362961521' then '3800.00'
      |when good_id = '577543694169' then '15000.00'
      |when good_id = '574480672578' then '28.80'
      |when good_id = '560743915293' then '199.00'
      |when good_id = '560841345868' then '798.00'
      |when good_id = '581677809499' then '11000.00'
      |when good_id = '557259569806' then '300'
      |when good_id = '573595207657' then '190'
      |when good_id = '41307604668' then '100'
      |when good_id = '580034644508' then '60.00'
      |when good_id = '582096450753' then '0.1'
      |when good_id = '532714866600' then '118'
      |
      |when good_id = '577276149441' then '650.00'
      |when good_id = '534009997984' then '181.00'
      |when good_id = '577026816670' then '800.00'
      |when good_id = '585895627655' then '699.00'
      |when good_id = '565672554316' then '256.00'
      |when good_id = '558523462944' then '256.00'
      |when good_id = '570331389999' then '237.76'
      |when good_id = '570431730942' then '196.32'
      |when good_id = '576034317656' then '156.00'
      |when good_id = '576747308532' then '126.00'
      |when good_id = '578437811694' then '96.00'
      |when good_id = '584937155318' then '248.00'
      |when good_id = '547754683903' then '1080.00'
      |when good_id = '554541642102' then '1080.00'
      |when good_id = '18308045235' then '262.00'
      |when good_id = '562245401594' then '9499.00'
      |when good_id = '563661094746' then '1180.00'
      |when good_id = '559986507727' then '19.9'
      |
      |when good_id = '567252609664' then '4099'
      |when good_id = '581896002547' then '97'
      |when good_id = '578565896997' then '58'
      |when good_id = '578559596239' then '38'
      |when good_id = '577206285154' then '500'
      |when good_id = '559596666864' then '600'
      |when good_id = '566873270152' then '700'
      |when good_id = '570979956838' then '338.04'
      |when good_id = '570108876717' then '990.89'
      |when good_id = '570336066626' then '693.42'
      |when good_id = '570108780805' then '1034.73'
      |when good_id = '586403557669' then '200.00'
      |when good_id = '585132000175' then '200.00'
      |when good_id = '585963922194' then '200.00'
      |when good_id = '585544136525' then '200.00'
      |when good_id = '586003221344' then '200.00'
      |when good_id = '585551357362' then '200.00'
      |when good_id = '586131037511' then '200.00'
      |when good_id = '586921503862' then '7496.00'
      |when good_id = '580095860924' then '851.00'
      |when good_id = '561630448518' then '300.00'
      |when good_id = '559828726974' then '400.00'
      |when good_id = '587009303502' then '593.00'
      |when good_id = '562043517753' then '720.00'
      |when good_id = '586760398742' then '450.00'
      |when good_id = '554773254757' then '1540.00'
      |when good_id = '586915159565' then '134.00'
      |when good_id = '580476515553' then '380.00'
      |when good_id = '566069958469' then '400.00'
      |when good_id = '566764151404' then '2599.00'
      |when good_id = '586473068374' then '467.00'
      |when good_id = '563124949376' then '825.00'
      |when good_id = '555069579178' then '780.00'
      |when good_id = '586855642905' then '499.00'
      |when good_id = '580406050574' then '1280.00'
      |when good_id = '573084093233' then '85.5'
      |when good_id = '577901182157' then '8.88'
      |when good_id = '572368151072' then '30'
      |when good_id = '547979848040' then '41.3'
      |
      |--3月
      |when good_id = '556572389536' then '35'
      |when good_id = '575242476229' then '78'
      |when good_id = '576068143881' then '430'
      |when good_id = '572437135241' then '99'
      |when good_id = '571941561135' then '92'
      |when good_id = '543353741123' then '79'
      |when good_id = '580534211406' then '78'
      |when good_id = '525753357283' then '75'
      |when good_id = '572412999695' then '53'
      |when good_id = '576757825068' then '219'
      |when good_id = '564126633881' then '223'
      |when good_id = '574035840166' then '9000'
      |when good_id = '584766569957' then '214.59'
      |when good_id = '562717473716' then '94.93'
      |when good_id = '571447867290' then '5112'
      |when good_id = '588585184547' then '213'
      |when good_id = '589326911821' then '4599'
      |when good_id = '586395516497' then '5998'
      |when good_id = '586744810062' then '21398'
      |when good_id = '562872874312' then '200'
      |when good_id = '575229789329' then '300'
      |when good_id = '555232294745' then '500'
      |when good_id = '577923655781' then '538'
      |when good_id = '586828005070' then '220'
      |when good_id = '565994221620' then '400'
      |when good_id = '540398843761' then '30'
      |
      |--4月
      |when good_id = '544476208844' then '298'
      |when good_id = '588607906251' then '50'
      |when good_id = '587428709171' then '10'
      |when good_id = '559529294794' then '185'
      |when good_id = '589379433055' then '298'
      |when good_id = '591529437150' then '998'
      |when good_id = '582955046013' then '9.9'
      |when good_id = '591985054396' then '189'
      |when good_id = '591830453272' then '189'
      |when good_id = '592104074327' then '11598'
      |when good_id = '586744922575' then '10400'
      |when good_id = '571279486231' then '23800'
      |when good_id = '570205974397' then '200'
      |when good_id = '577254091071' then '52760'
      |when good_id = '592644066808' then '2298'
      |when good_id = '565171579658' then '36.9'
      |when good_id = '583705745255' then '1502'
      |when good_id = '584648762864' then '339'
      |when good_id = '587215925038' then '627'
      |when good_id = '562880028830' then '36.9'
      |when good_id = '566453250428' then '21.8'
      |when good_id = '587715232820' then '79'
      |when good_id = '588106420734' then '113'
      |when good_id = '590717289079' then '7000'
      |when good_id = '579149378909' then '2000'
      |when good_id = '583572509082' then '38000'
      |when good_id = '563489334566' then '69999'
      |
      |--5月
      |when good_id = '590889817548' then '630'
      |when good_id = '591876351396' then '19.9'
      |
      |--618
      |when good_id = '589256281073' then '18800'
      |when good_id = '594755332067' then '3299'
      |when good_id = '593811096587' then '29.9'
      |when good_id = '595493539966' then '129.9'
      |when good_id = '585895354381' then '200'
      |when good_id = '593151759312' then '200'
      |when good_id = '585692287102' then '200'
      |when good_id = '574348156097' then '200'
      |when good_id = '569813970045' then '200'
      |when good_id = '594268393635' then '200'
      |when good_id = '592945326956' then '129.9'
      |when good_id = '562078713525' then '129.9'
      |when good_id = '537599982416' then '129.9'
      |when good_id = '589476037569' then '29.9'
      |when good_id = '549644958198' then '29.9'
      |when good_id = '594340416323' then '29.9'
      |when good_id = '594868989546' then '259'
      |when good_id = '592458603757' then '0'
      |when good_id = '595137446097' then '7998'
      |when good_id = '591535576320' then '58'
      |when good_id = '586195689353' then '1497'
      |
      |--5月
      |when good_id = '45688584395' then '258'
      |when good_id = '596204008756' then '169'
      |when good_id = '592201067205' then '199'
      |when good_id = '45708454248' then '268'
      |when good_id = '593058345579' then '5690'
      |when good_id = '564987092790' then '199'
      |when good_id = '587833146316' then '29.7'
      |when good_id = '594109089160' then '5690'
      |when good_id = '582395975817' then '72'
      |when good_id = '589442108562' then '27'
      |when good_id = '581412459015' then '10'
      |when good_id = '595727423809' then '69'
      |when good_id = '594542546294' then '258'
      |when good_id = '589816454527' then '348'
      |when good_id = '597045291792' then '26'
      |when good_id = '569683023504' then '258'
      |when good_id = '535574363220' then '258'
      |when good_id = '595238546725' then '258'
      |when good_id = '576476431384' then '258'
      |when good_id = '589782445247' then '26.88'
      |when good_id = '564893920217' then '26.88'
      |when good_id = '592272575779' then '2758'
      |when good_id = '592356661444' then '200'
      |when good_id = '588498824836' then '46000'
      |when good_id = '589582148680' then '13.2'
      |when good_id = '592273987821' then '2998'
      |when good_id = '586466501728' then '6520'
      |when good_id = '595122456191' then '4099'
      |
      |--7月
      |when good_id = '596403244888' then '231'
      |when good_id = '551025960249' then '179'
      |when good_id = '536994664237' then '88'
      |when good_id = '16182500505' then '260'
      |when good_id = '593880352916' then '8000'
      |when good_id = '597455740186' then '29.9'
      |when good_id = '597194497716' then '29.9'
      |when good_id = '598848866709' then '29.9'
      |when good_id = '598125156313' then '29.9'
      |when good_id = '599038911874' then '29.9'
      |when good_id = '584318830857' then '10'
      |when good_id = '595815364281' then '1'
      |when good_id = '588634002520' then '310'
      |when good_id = '589722702560' then '200'
      |when good_id = '590374915558' then '33'
      |when good_id = '592744052619' then '19.8'
      |when good_id = '556526078790' then '175.4'
      |when good_id = '556579315014' then '256.98'
      |when good_id = '594046008952' then '256.98'
      |when good_id = '43024773198' then '50000'
      |when good_id = '596974631335' then '29.6'
      |when good_id = '563730407135' then '100'
      |when good_id = '595619090699' then '1'
      |when good_id = '596377788613' then '1'
      |when good_id = '598221471090' then '1'
      |when good_id = '591134016425' then '10'
      |when good_id = '589445277631' then '50'
      |when good_id = '595217888268' then '50'
      |when good_id = '578021308855' then '150'
      |when good_id = '592120185049' then '20'
      |when good_id = '591399560478' then '80'
      |when good_id = '585398779520' then '150'
      |when good_id = '594722756866' then '164'
      |when good_id = '597433832887' then '164'
      |when good_id = '587949000157' then '500'
      |when good_id = '594432170710' then '99'
      |when good_id = '598020830139' then '89.8'
      |when good_id = '577680905770' then '1499'
      |when good_id = '588924440937' then '10'
      |when good_id = '567966710738' then '3158'
      |when good_id = '596328131714' then '10'
      |when good_id = '594113638093' then '10'
      |when good_id = '572011037754' then '89'
      |
      |
      |when good_id = '568272246928' then '49.99'
      |when good_id  ='585088557158' then '121.8'
      |when good_id  ='583467125720' then '68'
      |when good_id  ='582728839654' then '149'
      |when good_id  ='581320166149' then '48'
      |when good_id  ='583325715290' then '58'
      |when good_id  ='573546957388' then '100'
      |when good_id  ='578629460738' then '88'
      |when good_id  ='583325715290' then '58'
      |when good_id  ='566816648356' then '49.9'
      |when good_id  ='583500953815' then '29.9'
      |when good_id  ='585088557158' then '121.8'
      |when good_id  ='589370353886' then '40'
      |when good_id  ='582624437983' then '59'
      |when good_id  ='598212921017' then '9.9'
      |
      |--8月
      |when good_id  ='576296892844' then '595.00'
      |when good_id  ='569654439919' then '10.00'
      |when good_id  ='583861033688' then '68.00'
      |when good_id  ='544544132880' then '198.00'
      |when good_id  ='598362084561' then '10.00'
      |when good_id  ='598785274529' then '10.00'
      |when good_id  ='599614936326' then '99.00'
      |when good_id  ='588165381705' then '10.00'
      |when good_id  ='598546926475' then '10.00'
      |when good_id  ='599549059156' then '99.00'
      |when good_id  ='593940169984' then '100.00'
      |when good_id  ='598553569838' then '1.00'
      |when good_id  ='596996531035' then '38.00'
      |when good_id  ='595054701786' then '10.00'
      |when good_id  ='598536343775' then '99.00'
      |when good_id  ='600072935009' then '30.00'
      |when good_id  ='597178785216' then '269.00'
      |when good_id  ='598381078168' then '30.00'
      |when good_id  ='597589824633' then '10.00'
      |when good_id  ='598547386092' then '100.00'
      |when good_id  ='596058190638' then '343.57'
      |when good_id  ='593674798700' then '30.00'
      |when good_id  ='597367418945' then '1850.00'
      |when good_id  ='600621200725' then '1000.00'
      |when good_id  ='599862482323' then '30.00'
      |when good_id  ='598827592521' then '300.00'
      |when good_id  ='598016987852' then '50.00'
      |when good_id  ='599017462203' then '17998.00'
      |when good_id  ='587246423883' then '99.00'
      |when good_id  ='586742236637' then '99.00'
      |when good_id  ='588243857060' then '99.00'
      |when good_id  ='588384830187' then '99.00'
      |when good_id  ='585062842985' then '99.00'
      |when good_id  ='601605703257' then '50.00'
      |when good_id  ='595780514189' then '245.00'
      |when good_id  ='600111344457' then '43221.00'
      |when good_id  ='595573223644' then '80.00'
      |when good_id  ='598183569822' then '50.00'
      |when good_id  ='598646999455' then '50.00'
      |when good_id  ='587582785463' then '100.00'
      |when good_id  ='590711473613' then '100.00'
      |when good_id  ='600386708963' then '23.00'
      |when good_id  ='598200603970' then '1300.00'
      |when good_id  ='600401603445' then '368.00'
      |when good_id  ='591467492133' then '220.00'
      |when good_id  ='600591022867' then '99.00'
      |when good_id  ='594892354123' then '10.00'
      |when good_id  ='24577108899' then '1250.00'
      |when good_id  ='599334975784' then '100.00'
      |when good_id  ='600757465264' then '6699.00'
      |when good_id  ='599361890443' then '200.00'
      |when good_id  ='599660307202' then '30.00'
      |when good_id  ='601052928788' then '2699.00'
      |when good_id  ='600836381083' then '10.00'
      |when good_id  ='595463105010' then '119.00'
      |when good_id  ='553541492224' then '11800.00'
      |when good_id  ='583599165816' then '798.00'
      |when good_id  ='575625246760' then '5000.00'
      |when good_id  ='584529107300' then '798.00'
      |when good_id  ='597875158681' then '10.00'
      |when good_id  ='597689733799' then '10.00'
      |when good_id  ='599673678274' then '199.00'
      |when good_id  ='578316896450' then '5001.00'
      |when good_id  ='565095879655' then '32190.00'
      |when good_id  ='565095879655' then '32190.00'
      |
      |
      |
      |--9月
      |when good_id  ='585918084207' then '980.00'
      |when good_id  ='602799220392' then '4550.00'
      |when good_id  ='601211731768' then '99988.00'
      |when good_id  ='599954665030' then '100.00'
      |when good_id  ='598604841869' then '99.00'
      |when good_id  ='597664198338' then '99.00'
      |when good_id  ='599763839183' then '1120.00'
      |when good_id  ='554459541418' then '155.16'
      |when good_id  ='590683948671' then '1980.00'
      |when good_id  ='600733142214' then '5001.00'
      |when good_id  ='596160756031' then '237.46'
      |when good_id  ='602023459732' then '233.50'
      |when good_id  ='579418851286' then '170.98'
      |when good_id  ='523016017977' then '26800.00'
      |when good_id  ='602557056220' then '61600.00'
      |when good_id  ='42014070650' then '8800.00'
      |when good_id  ='600886881749' then '268220.00'
      |when good_id  ='578838724409' then '118.00'
      |when good_id  ='586452838479' then '33178.00'
      |when good_id  ='599908098820' then '599.00'
      |when good_id  ='577151007753' then '45.00'
      |when good_id  ='550050010558' then '889.00'
      |when good_id  ='573040991171' then '100.00'
      |when good_id  ='579509437005' then '45.00'
      |when good_id  ='603080582328' then '3999.01'
      |when good_id  ='599050472349' then '58.00'
      |when good_id  ='602048839897' then '10.00'
      |when good_id  ='602370425179' then '50.00'
      |when good_id  ='573443788982' then '520.00'
      |when good_id  ='576543372740' then '899.00'
      |when good_id  ='595327275884' then '268.00'
      |when good_id  ='577203511479' then '45.00'
      |when good_id  ='42687623288' then '1878.00'
      |when good_id  ='591771875654' then '100.00'
      |when good_id  ='602259237861' then '109.84'
      |when good_id  ='594912331807' then '5500.00'
      |when good_id  ='594566217243' then '1800.00'
      |when good_id  ='594563829101' then '1980.00'
      |when good_id  ='594653666495' then '8800.00'
      |when good_id  ='596203751218' then '1320.00'
      |when good_id  ='595847701247' then '1200.00'
      |when good_id  ='602415460529' then '100.00'
      |when good_id  ='594740442663' then '1760.00'
      |when good_id  ='594738794840' then '2000.00'
      |when good_id  ='594337104345' then '1300.00'
      |when good_id  ='601279366033' then '299.00'
      |when good_id  ='42509266616' then '600.00'
      |when good_id  ='601083023552' then '100.00'
      |
      |--10月
      |when good_id  ='576436762427' then '840.00'
      |when good_id  ='593996570034' then '46.00'
      |when good_id  ='601703186692' then '20.00'
      |when good_id  ='603507430384' then '300.00'
      |when good_id  ='601087286059' then '20.00'
      |when good_id  ='565952845780' then '15.00'
      |when good_id  ='553826667486' then '240.65'
      |when good_id  ='586319436032' then '213.40'
      |when good_id  ='586317792544' then '312.86'
      |when good_id  ='603784652358' then '200.00'
      |when good_id  ='601184971031' then '150.00'
      |when good_id  ='564087107774' then '91000.00'
      |when good_id  ='599081594097' then '35830.00'
      |when good_id  ='567218742182' then '150.00'
      |when good_id  ='570253546853' then '100.00'
      |when good_id  ='561560330213' then '3000.00'
      |when good_id  ='582664646647' then '376.00'
      |when good_id  ='603119234354' then '288.00'
      |when good_id  ='601292653414' then '300.00'
      |when good_id  ='604209313836' then '44.50'
      |when good_id  ='605891668832' then '5799.00'
      |when good_id  ='606141561884' then '3999.00'
      |when good_id  ='564473717759' then '1070.00'
      |when good_id  ='602640043118' then '1888.00'
      |when good_id  ='605892197001' then '1798.00'
      |when good_id  ='577365380197' then '1499.00'
      |when good_id  ='568268214904' then '3000.00'
      |when good_id  ='577392586978' then '690.00'
      |when good_id  ='601381367079' then '255.00'
      |when good_id  ='574084474234' then '300.00'
      |when good_id  ='593390291679' then '11.80'
      |when good_id  ='572334304398' then '210.00'
      |when good_id  ='587979795256' then '800.00'
      |when good_id  ='568051796634' then '960.00'
      |when good_id  ='602403086642' then '100.00'
      |when good_id  ='565950137398' then '17.00'
      |when good_id  ='574122399652' then '1050.00'
      |when good_id  ='573402892452' then '720.00'
      |when good_id  ='603349063607' then '1260.00'
      |when good_id  ='601211731768' then '100.00'
      |when good_id  ='583921859969' then '800.00'
      |when good_id  ='561170814044' then '833.33'
      |when good_id  ='606695786861' then '156.00'
      |when good_id  ='605405269442' then '180.00'
      |when good_id  ='605626454928' then '180.00'
      |when good_id  ='561283055027' then '2000.00'
      |when good_id  ='601146698890' then '180.00'
      |when good_id  ='526051677105' then '480.00'
      |when good_id  ='594557949764' then '2299.00'
      |when good_id  ='563894825010' then '473.00'
      |when good_id  ='561138502316' then '500.00'
      |when good_id  ='534738906527' then '9200.00'
      |when good_id  ='582057339417' then '6696.00'
      |when good_id  ='583726122204' then '580.00'
      |when good_id  ='586807539043' then '10000.00'
      |when good_id  ='41005481811' then '10000.00'
      |when good_id  ='603898053817' then '300.00'
      |when good_id  ='586536153246' then '66285.00'
      |when good_id  ='589171202301' then '120.00'
      |when good_id  ='549216477418' then '100.00'
      |when good_id  ='605436762536' then '40000.00'
      |when good_id  ='521354879004' then '198.00'
      |when good_id  ='582088422411' then '5000.00'
      |when good_id  ='606443511735' then '196.00'
      |when good_id  ='592611483023' then '10000.00'
      |when good_id  ='605661142555' then '1000.00'
      |when good_id  ='564041184072' then '1000.00'
      |when good_id  ='601679366989' then '200.00'
      |when good_id  ='595318226361' then '120.00'
      |when good_id  ='581521001735' then '500.00'
      |when good_id  ='584317753631' then '89.00'
      |when good_id  ='606899802031' then '50.00'
      |when good_id  ='591136742463' then '18.00'
      |
      |--11月
      |when good_id  ='607689771269' then '50.00'
      |when good_id  ='593518548831' then '198.00'
      |when good_id  ='601901446731' then '499.00'
      |when good_id  ='607663407943' then '499.00'
      |when good_id  ='523744916891' then '20.00'
      |when good_id  ='600556744525' then '37.80'
      |when good_id  ='591720892219' then '199.0'
      |when good_id  ='606608444593' then '9800.0'
      |when good_id  ='590113697167' then '959.0'
      |when good_id  ='599721084483' then '101.0'
      |when good_id  ='595432009176' then '198.0'
      |when good_id  ='605209437195' then '39.9'
      |when good_id  ='575625608635' then '88.0'
      |when good_id  ='607098197863' then '399.0'
      |when good_id  ='607164316695' then '278.0'
      |when good_id  ='571862433278' then '4000.0'
      |when good_id  ='602424053602' then '5000.0'
      |when good_id  ='571250637093' then '88.0'
      |when good_id  ='600943218565' then '179.0'
      |when good_id  ='609004919104' then '100.0'
      |when good_id  ='600387762156' then '198.0'
      |when good_id  ='568831856307' then '76.0'
      |when good_id  ='582496394110' then '100.0'
      |when good_id  ='607637716565' then '5140.0'
      |when good_id  ='526218961600' then '320.0'
      |when good_id  ='583300004634' then '500.0'
      |when good_id  ='603709591723' then '119.0'
      |when good_id  ='607241373172' then '50.0'
      |when good_id  ='579239405224' then '3880.0'
      |when good_id  ='593401672327' then '8700.0'
      |when good_id  ='607468681799' then '1000.0'
      |when good_id  ='609171675308' then '3001.0'
      |when good_id  ='605761896629' then '49.0'
      |when good_id  ='561435038486' then '23400.0'
      |when good_id  ='608421386385' then '5000.0'
      |when good_id  ='606081583999' then '8000.0'
      |when good_id  ='598220674775' then '3000.0'
      |when good_id  ='548220863516' then '500.0'
      |when good_id  ='607436909321' then '1000.0'
      |when good_id  ='570837268711' then '500.0'
      |when good_id  ='607161354759' then '999.0'
      |when good_id  ='599471315914' then '200.0'
      |when good_id  ='607328844459' then '1000.0'
      |when good_id  ='534512752959' then '1000.0'
      |when good_id  ='596147453207' then '22500.0'
      |when good_id  ='606009461641' then '50.0'
      |when good_id  ='586619253339' then '499.0'
      |when good_id  ='606906474208' then '449.0'
      |when good_id  ='572193678004' then '19200.0'
      |when good_id  ='526230196603' then '28000.0'
      |when good_id  ='599658187519' then '198.0'
      |when good_id  ='564119895680' then '14778.14'
      |when good_id  ='2253789128' then '1000.00'
      |when good_id  ='608043611731' then '100.00'
      |when good_id  ='607104273640' then '1596.00'
      |when good_id  ='596499121731' then '200.00'
      |when good_id  ='581728717424' then '3800.00'
      |when good_id  ='596225887133' then '200.00'
      |when good_id  ='604317789039' then '2000.00'
      |when good_id  ='543487542437' then '168.00'
      |when good_id  ='608600145642' then '30.00'
      |when good_id  ='596755052679' then '98.00'
      |when good_id  ='607665686623' then '1000.00'
      |when good_id  ='607555969418' then '100.00'
      |when good_id  ='608652198872' then '10.00'
      |when good_id  ='607215249005' then '500.00'
      |when good_id  ='600500183937' then '15.00'
      |when good_id  ='600729090471' then '1199.00'
      |when good_id  ='574756355230' then '138.00'
      |when good_id  ='595745799298' then '7090.00'
      |when good_id  ='585262229304' then '1290.00'
      |when good_id  ='598293019178' then '399.00'
      |when good_id  ='582570138679' then '99.00'
      |when good_id  ='607245647035' then '118.00'
      |when good_id  ='604720075977' then '1000.00'
      |when good_id  ='606949269822' then '99.00'
      |when good_id  ='606003061473' then '4299.00'
      |when good_id  ='43555579143' then '18.90'
      |when good_id  ='607504495900' then '159.0'
      |when good_id  ='573562496650' then '750.0'
      |when good_id  ='606469853511' then '29000.0'
      |when good_id  ='607571450483' then '29000.0'
      |when good_id  ='606213164816' then '29000.0'
      |when good_id  ='594097786839' then '85.0'
      |when good_id  ='573650128023' then '175.0'
      |when good_id  ='563367411170' then '20.0'
      |when good_id  ='539792561870' then '1080.0'
      |when good_id  ='603041924366' then '3580.0'
      |when good_id  ='607841755458' then '2080.0'
      |when good_id  ='568679635735' then '100.0'
      |when good_id  ='599073094458' then '88.0'
      |when good_id  ='569967964243' then '100.0'
      |when good_id  ='597874514209' then '100.0'
      |when good_id  ='597874514209' then '100.0'
      |
      |
      |--12月
      |when good_id  ='605451556523' then '9.9'
      |when good_id  ='605720235981' then '0.01'
      |when good_id  ='602598216180' then '100'
      |when good_id  ='603248651905' then '10.0'
      |when good_id  ='602312336967' then '10.0'
      |when good_id  ='607432529938' then '38.0'
      |when good_id  ='599437659475' then '101.0'
      |when good_id  ='575241550072' then '450.0'
      |when good_id  ='598095788991' then '100.0'
      |when good_id  ='599489694596' then '100.0'
      |when good_id  ='580224501627' then '69.0'
      |when good_id  ='581418129156' then '1.0'
      |when good_id  ='595300468139' then '1.0'
      |when good_id  ='596550648760' then '10.0'
      |when good_id  ='604276443851' then '119.9'
      |when good_id  ='585489291413' then '1630'
      |when good_id  ='558736198090' then '108.0'
      |when good_id  ='558593692475' then '108.0'
      |when good_id  ='596949766272' then '99.0'
      |when good_id  ='608173892074' then '31.2'
      |when good_id  ='610369701133' then '28.0'
      |when good_id  ='600899506609' then '5000.0'
      |when good_id  ='586271665287' then '203.0'
      |when good_id  ='610804251927' then '20.0'
      |when good_id  ='610592958607' then '99.0'
      |when good_id  ='610818370796' then '99.0'
      |when good_id  ='537873684227' then '200.0'
      |when good_id  ='610684739425' then '100.0'
      |when good_id  ='608542336135' then '20.0'
      |when good_id  ='610521071052' then '200.0'
      |when good_id  ='610783151883' then '200.0'
      |when good_id  ='608450340957' then '27.72'
      |when good_id  ='609134047251' then '10.0'
      |when good_id  ='595654886416' then '20.0'
      |when good_id  ='595398219244' then '10.0'
      |when good_id  ='610133267966' then '200.0'
      |when good_id  ='609017898087' then '2000.0'
      |when good_id  ='608523240106' then '1000.0'
      |when good_id  ='587413402156' then '2000.0'
      |when good_id  ='596981515898' then '58.0'
      |when good_id  ='598478829251' then '98600.0'
      |when good_id  ='609843530988' then '100.0'
      |when good_id  ='608453529990' then '100.0'
      |when good_id  ='610251029830' then '200.0'
      |when good_id  ='609949713479' then '100.0'
      |when good_id  ='610700659888' then '200.0'
      |when good_id  ='569005881253' then '106.0'
      |when good_id  ='590180064779' then '200.0'
      |when good_id  ='610205349787' then '100.0'
      |when good_id  ='609770441744' then '10.0'
      |when good_id  ='610549086295' then '100.0'
      |when good_id  ='571406337663' then '10.0'
      |when good_id  ='603733144019' then '20.0'
      |when good_id  ='601960787029' then '20.0'
      |when good_id  ='608774059933' then '45000.0'
      |when good_id  ='608966882844' then '100.0'
      |when good_id  ='608847608188' then '1000.0'
      |when good_id  ='608685696039' then '50.0'
      |when good_id  ='607273192541' then '1500.0'
      |when good_id  ='609167140054' then '20.0'
      |when good_id  ='606319105028' then '499.0'
      |when good_id  ='573586856476' then '1000.0'
      |when good_id  ='570255364570' then '10.0'
      |when good_id  ='605669982519' then '500.0'
      |when good_id  ='603114779999' then '200.0'
      |when good_id  ='571657907087' then '500.0'
      |when good_id  ='609565339881' then '2000.0'
      |when good_id  ='610927199787' then '1000.0'
      |when good_id  ='598339319326' then '1000.0'
      |when good_id  ='575883886637' then '1000.0'
      |when good_id  ='601023626681' then '128.0'
      |when good_id  ='610778466771' then '20.0'
      |when good_id  ='610361510234' then '100.0'
      |when good_id  ='591774178358' then '120.0'
      |when good_id  ='559887916507' then '120.0'
      |when good_id  ='610014642947' then '1198.0'
      |when good_id  ='605626664567' then '1000.0'
      |when good_id  ='607638897366' then '500.0'
      |when good_id  ='569152684336' then '11000.0'
      |when good_id  ='578783275509' then '200.0'
      |when good_id  ='567762631677' then '5.0'
      |when good_id  ='591562539978' then '500.0'
      |when good_id  ='610194826584' then '20.0'
      |when good_id  ='610214609056' then '500.0'
      |when good_id  ='603147685246' then '500.0'
      |when good_id  ='552553398685' then '500.0'
      |when good_id  ='540795649147' then '300.0'
      |when good_id  ='610431322371' then '1980.0'
      |when good_id  ='609027231793' then '300.0'
      |when good_id  ='575764397220' then '100.0'
      |when good_id  ='596892507162' then '975.0'
      |when good_id  ='608748217091' then '5.0'
      |when good_id  ='596314128798' then '300.0'
      |when good_id  ='610666366794' then '10.0'
      |when good_id  ='610212443681' then '500.0'
      |when good_id  ='575707763144' then '328.0'
      |when good_id  ='608839536478' then '175.0'
      |when good_id  ='610217513800' then '300.0'
      |when good_id  ='599052492157' then '50.0'
      |when good_id  ='605784668366' then '200.0'
      |when good_id  ='590634265826' then '1250.0'
      |when good_id  ='609386272667' then '100.0'
      |when good_id  ='609138274311' then '300.0'
      |when good_id  ='602161780468' then '3000.0'
      |when good_id  ='605595295869' then '39.0'
      |when good_id  ='607296096018' then '200.0'
      |when good_id  ='608839254617' then '3000.0'
      |when good_id  ='610708438480' then '38.0'
      |when good_id  ='604155373245' then '10.0'
      |when good_id  ='610069287807' then '300.0'
      |when good_id  ='584460646351' then '2888.0'
      |when good_id  ='606418280562' then '20.0'
      |when good_id  ='609683464410' then '100.0'
      |when good_id  ='608868596321' then '2000.0'
      |when good_id  ='610231743883' then '2000.0'
      |when good_id  ='608061644824' then '200.0'
      |when good_id  ='610208207541' then '300.0'
      |when good_id  ='607297896905' then '300.0'
      |when good_id  ='597362000599' then '10.0'
      |when good_id  ='577680529753' then '2080.0'
      |when good_id  ='610366452181' then '300.0'
      |when good_id  ='608036663642' then '198.0'
      |when good_id  ='609652429375' then '200.0'
      |when good_id  ='609447506719' then '328.0'
      |when good_id  ='607636789995' then '100.0'
      |when good_id  ='610500847133' then '100.0'
      |when good_id  ='609128739890' then '50.0'
      |when good_id  ='608557298370' then '50.0'
      |when good_id  ='610431809802' then '200.0'
      |when good_id  ='608641975396' then '50.0'
      |when good_id  ='577953376466' then '30000.0'
      |when good_id  ='604618791331' then '100.0'
      |when good_id  ='585536873253' then '50.0'
      |when good_id  ='562221539867' then '1999.0'
      |when good_id  ='610209667325' then '1258.0'
      |when good_id  ='596924367279' then '100.0'
      |when good_id  ='606981504937' then '1000.0'
      |when good_id  ='609517071237' then '1000.0'
      |when good_id  ='610453926778' then '500.0'
      |when good_id  ='596741599337' then '150.0'
      |when good_id  ='610235405968' then '2000.0'
      |when good_id  ='560704387682' then '23000.0'
      |when good_id  ='37207258202' then '36800.0'
      |when good_id  ='605402308451' then '999'
      |when good_id  ='610266939267' then '1'
      |when good_id  ='606458966650' then '1001'
      |when good_id  ='602744024465' then '1'
      |when good_id  ='608940109054' then '189'
      |when good_id  ='595058671360' then '10001'
      |when good_id  ='603410239903' then '75'
      |when good_id  ='577434716266' then '46.8'
      |when good_id  ='609501896424' then '499'
      |when good_id  ='609386744165' then '1'
      |when good_id  ='610175037737' then '19.9'
      |when good_id  ='594345468343' then '10001'
      |when good_id  ='603879573236' then '10001'
      |when good_id  ='602759130729' then '49.9'
      |when good_id  ='608859158604' then '1'
      |when good_id  ='595129212220' then '88888'
      |when good_id  ='573563534168' then '398'
      |when good_id  ='602747604123' then '79'
      |when good_id  ='610232183110' then '99999'
      |when good_id  ='602447339564' then '50'
      |when good_id  ='609598889389' then '99'
      |when good_id  ='602681896544' then '30'
      |when good_id  ='603015673253' then '50'
      |when good_id  ='604697059304' then '9999'
      |when good_id  ='599958073985' then '499'
      |when good_id  ='549609685018' then '99998'
      |when good_id  ='610642698974' then '88'
      |when good_id  ='608864047552' then '50001'
      |when good_id  ='539346207471' then '9.9'
      |when good_id  ='609169699134' then '99'
      |when good_id  ='587913662897' then '10000'
      |when good_id  ='610407678073' then '448'
      |when good_id  ='567122416271' then '99000'
      |when good_id  ='606909083713' then '99000'
      |when good_id  ='598474211546' then '99000'
      |when good_id  ='571715042201' then '98688'
      |when good_id  ='610150806488' then '98500'
      |when good_id  ='583977501732' then '1000'
      |when good_id  ='608957362322' then '980'
      |when good_id  ='608094875803' then '98000'
      |when good_id  ='591088603010' then '98000'
      |when good_id  ='572085585251' then '98000'
      |when good_id  ='608628357013' then '97900'
      |when good_id  ='39505120293' then '	53334'
      |when good_id  ='602126248365' then '9.9'
      |when good_id  ='610185460287' then '97000'
      |when good_id  ='609097377383' then '96490'
      |when good_id  ='598926952541' then '5.78'
      |when good_id  ='609971435141' then '960'
      |when good_id  ='602659787253' then '50001'
      |when good_id  ='579369536856' then '91800'
      |when good_id  ='594562482718' then '91026'
      |when good_id  ='610698050782' then '910'
      |when good_id  ='609087374881' then '90002'
      |when good_id  ='607285637271' then '9'
      |when good_id  ='535920198722' then '9000'
      |when good_id  ='609403324222' then '90000'
      |when good_id  ='556842109756' then '9'
      |when good_id  ='610742451746' then '89999'
      |when good_id  ='597688415450' then '89999'
      |when good_id  ='597651735683' then '89999'
      |when good_id  ='604100525900' then '89999'
      |when good_id  ='558913787992' then '89888'
      |when good_id  ='604420646749' then '89003'
      |when good_id  ='609787277854' then '88888'
      |when good_id  ='610241015102' then '88888'
      |when good_id  ='605871152883' then '88888'
      |when good_id  ='571091108250' then '88800'
      |when good_id  ='608046760802' then '88800'
      |when good_id  ='593210642187' then '88600'
      |when good_id  ='544337321927' then '88000'
      |when good_id  ='564227963330' then '88000'
      |when good_id  ='557903774955' then '880'
      |when good_id  ='608724213127' then '881'
      |when good_id  ='560419674399' then '880'
      |when good_id  ='573786290728' then '200'
      |when good_id  ='589738317015' then '8760'
      |when good_id  ='588136447998' then '87500'
      |when good_id  ='576511851803' then '87500'
      |when good_id  ='529528321855' then '86800'
      |when good_id  ='563330376286' then '86799'
      |when good_id  ='607154906567' then '86'
      |when good_id  ='599837770418' then '200'
      |when good_id  ='561293061297' then '86000'
      |when good_id  ='601598296278' then '860'
      |when good_id  ='610024853112' then '8550'
      |when good_id  ='610551674448' then '208'
      |when good_id  ='605365430929' then '8499'
      |when good_id  ='558130730052' then '836'
      |when good_id  ='582166707142' then '832'
      |when good_id  ='589901880999' then '83000'
      |when good_id  ='607655787378' then '47900'
      |when good_id  ='610317266266' then '33944'
      |when good_id  ='609814692280' then '34400'
      |when good_id  ='607458626090' then '81900'
      |when good_id  ='606219057432' then '507'
      |when good_id  ='592805554017' then '1'
      |when good_id  ='611087891186' then '80888'
      |when good_id  ='557935689084' then '80'
      |
      |
      |--20-1
      |when good_id  ='611289535796' then '2000'
      |when good_id  ='597044033048' then '384'
      |when good_id  ='585538410825' then '50'
      |when good_id  ='604481602857' then '79'
      |when good_id  ='582641630908' then '35'
      |when good_id  ='606798048163' then '10'
      |when good_id  ='605832903669' then '128'
      |when good_id  ='611262828415' then '58'
      |when good_id  ='601934261529' then '10'
      |--when good_id  ='607462977537' then '200'
      |--when good_id  ='583525022606' then '200'
      |--when good_id  ='589600575060' then '200'
      |--when good_id  ='586982965942' then '200'
      |--when good_id  ='560923778317' then '200'
      |--when good_id  ='608859219339' then '200'
      |--when good_id  ='608405005657' then '200'
      |--when good_id  ='609839208512' then '200'
      |--when good_id  ='610545870532' then '200'
      |--when good_id  ='609908078547' then '200'
      |--when good_id  ='592530629364' then '200'
      |--when good_id  ='584320675320' then '200'
      |--when good_id  ='610464219664' then '200'
      |--when good_id  ='605165502718' then '200'
      |--when good_id  ='584138672785' then '200'
      |--when good_id  ='585599615193' then '200'
      |--when good_id  ='589290665449' then '200'
      |
      |--2002
      |when good_id  ='610566780945' then '175.9'
      |when good_id  ='606922640757' then '850'
      |when good_id  ='608285932547' then '100'
      |when good_id  ='613217555702' then '3999'
      |when good_id  ='577396689118' then '68'
      |when good_id  ='603007709941' then '120'
      |when good_id  ='612430738871' then '114'
      |when good_id  ='612186741656' then '114'
      |when good_id  ='610455964683' then '137800'
      |when good_id  ='593794998624' then '10200'
      |when good_id  ='610688190366' then '98'
      |when good_id  ='581925774396' then '10'
      |when good_id  ='582319552351' then '19522'
      |when good_id  ='612031941218' then '4539'
      |when good_id  ='602167355329' then '10'
      |when good_id  ='593250272304' then '15'
      |when good_id  ='569702073185' then '1869'
      |when good_id  ='612136428584' then '1'
      |when good_id  ='602492138784' then '11.25'
      |when good_id  ='610852748088' then '259'
      |when good_id  ='586246450870' then '47262'
      |when good_id  ='606089246276' then '326'
      |when good_id  ='568605854229' then '2589'
      |when good_id  ='585259410876' then '2100'
      |when good_id  ='600118744302' then '200'
      |when good_id  ='605957104962' then '10'
      |when good_id  ='598478829251' then '20000'
      |when good_id  ='612684627459' then '2000'
      |when good_id  ='611493542009' then '64500'
      |when good_id  ='579369536856' then '31800'
      |when good_id  ='604100525900' then '299'
      |when good_id  ='597083060115' then '152'
      |when good_id  ='597651735683' then '10'
      |when good_id  ='608081083721' then '10'
      |when good_id  ='597688415450' then '1039'
      |when good_id  ='602669552392' then '339'
      |when good_id  ='552632740233' then '1000'
      |when good_id  ='601248178819' then '19.8'
      |when good_id  ='607733550966' then '1000'
      |when good_id  ='575055866130' then '13039'
      |when good_id  ='536314116137' then '100'
      |when good_id  ='596160164711' then '10'
      |when good_id  ='610966527515' then '1999'
      |
      |
      |--202003
      |when good_id  ='608856437605' then '10'
      |when good_id  ='608896597646' then '10'
      |when good_id  ='612057492929' then '30'
      |when good_id  ='612815979989' then '30'
      |when good_id  ='612447812728' then '3280'
      |when good_id  ='612574358988' then '20'
      |when good_id  ='611790701847' then '10'
      |when good_id  ='613025965245' then '10'
      |when good_id  ='612060900041' then '50'
      |when good_id  ='612575562258' then '50'
      |when good_id  ='612816711527' then '50'
      |when good_id  ='612575654301' then '50'
      |when good_id  ='612331437616' then '10'
      |when good_id  ='612060696171' then '10'
      |when good_id  ='612331341585' then '10'
      |when good_id  ='613963329112' then '50'
      |when good_id  ='612754541194' then '150'
      |when good_id  ='608044527102' then '46332'
      |when good_id  ='605520459076' then '13'
      |when good_id  ='604854115178' then '10'
      |when good_id  ='610796970059' then '1399'
      |when good_id  ='603506007267' then '3000'
      |when good_id  ='606530472540' then '200'
      |when good_id  ='614421041876' then '200'
      |when good_id  ='608838376153' then '200'
      |when good_id  ='606156168053' then '200'
      |when good_id  ='606727965244' then '200'
      |when good_id  ='609100053993' then '200'
      |when good_id  ='606848823607' then '200'
      |
      |
      |
      |--20191106添加
      |when shopId='235374259'
      |or shopId='262093609'
      |or shopId='202460011'
      |or shopId='543433141'
      |or shopId='269129312'
      |then(
      |case
      |when priceText>1000 then priceText/100.0
      |else priceText end
      |)
      |
      |
      |when shopId = '421687142' then (
      |case
      |when priceText <= 5 then priceText
      |when priceText > 5 and priceText <= 10 then (priceText-5)
      |when priceText > 10 and priceText <= 30 then (priceText-10)
      |when priceText > 30  and priceText <= 110  then (priceText-30)
      |when priceText > 110 and priceText <= 200 then (priceText-100)
      |when priceText > 200 and priceText <= 300 then (priceText-200)
      |when priceText > 300 and priceText <= 400 then (priceText-300)
      |when priceText > 400 and priceText <= 500 then (priceText-400)
      |when priceText > 500 and priceText <= 600 then (priceText-500)
      |else priceText end
      |)
      |
      |
      |when shopId = '431553632' then (
      |case
      |when priceText <= 500 then priceText
      |when priceText > 500 then  (priceText-500)
      |else priceText end
      |)
      |
      |
      |
      |when shopId = '223545883' then (
      |case
      |when priceText <= 10 then priceText
      |when priceText > 10 and priceText <= 20 then (priceText-10)
      |when priceText > 20   then (priceText-20)
      |else priceText end
      |)
      |
      |when shopId = '411067916' then (
      |case
      |when priceText <= 15 then priceText
      |when priceText > 15 and priceText <= 30 then (priceText-15)
      |when priceText > 30 and priceText <= 40 then (priceText-30)
      |when priceText > 40 and priceText <= 45 then (priceText-40)
      |when priceText > 45 and priceText <= 70  then (priceText-45)
      |when priceText > 70 and priceText <= 200  then (priceText-70)
      |when priceText > 200   then (priceText-200)
      |else priceText end
      |)
      |
      |when shopId = '249613267' then (
      |case
      |when priceText <= 120 then priceText
      |when priceText > 120 and priceText <= 200 then (priceText-100)
      |when priceText > 200 and priceText <= 300 then (priceText-200)
      |when priceText > 300 and priceText <= 400 then (priceText-300)
      |else priceText end
      |)
      |
      |when shopId = '69493007' then (
      |case
      |when priceText <= 110 then priceText
      |when priceText > 110 and priceText <= 200 then (priceText-100)
      |when priceText > 200 and priceText <= 300 then (priceText-200)
      |when priceText > 300 and priceText <= 800 then (priceText-300)
      |when priceText >800 and priceText <=1100 then (priceText-800)
      |when priceText > 1100 then (priceText-1100)
      |else priceText end
      |)
      |
      |when shopId = '361174465' then (
      |case
      |when priceText <= 300 then priceText
      |when priceText > 300 then (priceText-300)
      |else priceText end
      |)
      |
      |
      |when shopId = '72661213' then (
      |case
      |when priceText <= 100 then priceText
      |when priceText > 100 and priceText <= 200 then (priceText-100)
      |when priceText > 200 then (priceText-200)
      |else priceText end
      |)
      |
      |
      |when shopId = '111828598' then (
      |case
      |when priceText <= 60 then priceText
      |when priceText > 60 and priceText <= 150 then (priceText-60)
      |when priceText > 150 and priceText <= 260 then (priceText-150)
      |when priceText > 260 and priceText <= 300 then (priceText-260)
      |when priceText > 300   then (priceText-300)
      |else priceText end
      |)
      |
      |when shopId = '102249931' then (
      |case
      |when priceText <= 40 then priceText
      |when priceText > 40 and priceText <= 60 then (priceText-40)
      |when priceText > 60 and priceText <= 70 then (priceText-60)
      |when priceText > 70 and priceText <= 100 then (priceText-70)
      |when priceText > 100 and priceText <= 120 then (priceText-100)
      |when priceText > 120 and priceText <= 130 then (priceText-120)
      |when priceText > 130 and priceText <= 200 then (priceText-130)
      |when priceText > 200 and priceText <= 300 then (priceText-200)
      |when priceText > 300   then (priceText-300)
      |else priceText end
      |)
      |
      |when shopId  ='152389632' then (
      |case
      |
      |when priceText <= 100 then priceText
      |when priceText > 100 and priceText <= 200 then (priceText-100)
      |when priceText > 200 and priceText <= 300 then (priceText-200)
      |when priceText > 300 and priceText <= 400 then (priceText-300)
      |when priceText > 400 and priceText <= 1000 then (priceText-400)
      |when priceText > 1000  then (priceText-1000)
      |else priceText end
      |)
      |
      |when shopId = '119557321' then (
      |case
      |when priceText <= 100 then priceText
      |when priceText > 100 and priceText <= 150 then (priceText-100)
      |when priceText > 150 and priceText <= 200 then (priceText-150)
      |when priceText > 200 and priceText <= 300 then (priceText-200)
      |when priceText > 300   then (priceText-300)
      |else priceText end
      |)
      |
      |when shopId = '217685461' then (
      |case
      |when priceText <= 60 then priceText
      |when priceText > 60 and priceText <= 100 then (priceText-60)
      |when priceText > 100 and priceText <= 200 then (priceText-100)
      |when priceText > 200 and priceText <= 300 then (priceText-200)
      |
      |when priceText > 300 and priceText <= 400 then (priceText-300)
      |when priceText > 400 and priceText <= 500 then (priceText-400)
      |when priceText > 500 and priceText <= 600 then (priceText-500)
      |when priceText > 600 and priceText <= 700 then (priceText-600)
      |
      |when priceText > 700 and priceText <= 800 then (priceText-700)
      |when priceText > 800  then (priceText-800)
      |else priceText end
      |)
      |
      |when shopId = '70126531' then (
      |case
      |when priceText <= 30 then priceText
      |when priceText > 30 and priceText <= 50 then (priceText-30)
      |when priceText > 50 and priceText <= 65 then (priceText-50)
      |when priceText > 65 and priceText <= 70 then (priceText-65)
      |when priceText > 70   then (priceText-70)
      |else priceText end
      |)
      |
      |when shopId = '105969373' then (
      |case
      |when priceText <= 1 then priceText
      |when priceText > 1 and priceText <= 10 then (priceText-1)
      |when priceText > 10 and priceText <= 40 then (priceText-10)
      |when priceText > 40 and priceText <= 50 then (priceText-40)
      |when priceText > 50 and priceText <= 60 then (priceText-50)
      |when priceText > 60 and priceText <= 70 then (priceText-60)
      |when priceText > 70 and priceText <= 100 then (priceText-70)
      |when priceText > 100 and priceText <= 110 then (priceText-100)
      |when priceText > 110 and priceText <= 120 then (priceText-110)
      |when priceText > 120 and priceText <= 150 then (priceText-120)
      |when priceText > 150 and priceText <= 160 then (priceText-150)
      |when priceText > 160 and priceText <= 200 then (priceText-160)
      |when priceText > 200 and priceText <= 210 then (priceText-200)
      |when priceText > 210   then (priceText-210)
      |else priceText end
      |)
      |else priceText end priceTexts
    """.stripMargin


  //销量价格计算调用
  def sellandpricerestart(sqlContext:SQLContext):DataFrame = {
    //销量的清洗
    val sell_res = tmall_sell_clear(sqlContext)
    //val sell_res = a_o2odata_deal.utils.sell_deal_v1.sell_deal(sqlContext)
    //价格的清洗
    val price_res = price_restart(sqlContext,sell_res)
    price_res
  }

  //其他模块清洗调用
  def otherrestart(sqlContext:SQLContext,price_res:DataFrame):Unit = {
    //变量和常量关联,须保留
    val conandvar_res = conandvar_deal.tmCVcommite(sqlContext,price_res)

    //双十一关联常量，变量
    //val conandvar_res = o2o_2019_11.clean.price_clean.tmCVcommite(sqlContext,price_res)

    //关联分类,地址，农产品，商务部农产品
    val cate_pro_addrss_res = cate_restart(sqlContext.sparkSession,conandvar_res)

    //关联分类,地址，农产品，商务部农产品结果进行保存
    cate_pro_addrss_res.repartition(4).write.json(a_aa_amainpackage.a_o2odata_deal.config.config.cate_path)

    //spark:SparkSession,sqlContext:SQLContext,platformName:String,timeStamp:String,data_path:String,source_result:String,
    //old_brand_path:String,result_path:String,brand_newAdd:String
    //品牌的清洗
    /*val brand_res  =  brand_handle(cate_pro_addrss_res,
      sqlContext.sparkSession,old_brand_path,result_path,brand_newAdd,platform,source_result,sqlContext,brand_time)
    tm_shop.tm_shop(sqlContext,brand_res)*/
  }



  //获取前月的最后一天
  def getNowMonthEnd(): String = {
    var period: String = ""
    var cal = Calendar.getInstance();
    //2019/7/30 0:0:0
    var df: SimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
    cal.set(Calendar.DATE, 0)
    period = df.format(cal.getTime())
    var date  = new Date()
    if(period.substring(8,10).toInt > 30){
      date = df.parse(period.substring(0,8).concat("30").concat(period.substring(10,period.length)))
    }else {
      date = df.parse(period)
    }
    val time = date.getTime.toString.substring(0,10)
    time
  }




}
